MESSAGE_TRAY_PRESSURE_TIMEOUT,
Shell.KeyBindingMode.NORMAL |
Shell.KeyBindingMode.OVERVIEW);
+ this._trayPressure.setEventFilter(this._trayBarrierEventFilter);
this._trayPressure.connect('trigger', function(barrier) {
Main.messageTray.openTray();
});
},
+ _trayBarrierEventFilter: function(event) {
+ // Throw out all events where the pointer was grabbed by another
+ // client, as the client that grabbed the pointer expects to have
+ // complete control over it
+ if (event.grabbed && Main.modalCount == 0)
+ return true;
+
+ return false;
+ },
+
_monitorsChanged: function() {
this._updateMonitors();
this._updateBoxes();
this._timeout = timeout;
this._keybindingMode = keybindingMode;
this._orientation = (barrier.y1 == barrier.y2) ? Clutter.Orientation.HORIZONTAL : Clutter.Orientation.VERTICAL;
+ this._eventFilter = null;
this._isTriggered = false;
this._reset();
this._barrier = null;
},
+ setEventFilter: function(filter) {
+ this._eventFilter = filter;
+ },
+
_reset: function() {
this._barrierEvents = [];
this._currentPressure = 0;
if (this._isTriggered)
return;
- // Throw out all events where the pointer was grabbed by another
- // client, as the client that grabbed the pointer expects to have
- // complete control over it
- if (event.grabbed && Main.modalCount == 0)
+ if (this._eventFilter && this._eventFilter(event))
return;
// Throw out all events not in the proper keybinding mode